home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-03-19 | 5.4 KB | 154 lines | [TEXT/MPS ] |
- #########################################################################
- #########################################################################
- ## Copyright © Apple Computer, Inc. 1993-1997
- ## All rights reserved
- #########################################################################
- #########################################################################
- #
- # Library: Custom.Lib
- #
- # Version: 2.1.4
- #
- # Description: This library is intended to override the reference to
- # Custom.lib in scripts using the SPEC 1.2 libraries. To
- # do this, the folder containing this library must be
- # above the SPEC Libraries folder in the Library Search
- # Path window.
- #
- # The most important task is InitCustom(). It is used to
- # set SPEC global variables such as task references
- # and TCS output methods, so that SPEC works the way
- # HLQ Automation needs it to.
- #
- # Contains:
- # InitCustom()
- # CustomScrollWindow()
- # CustomExitVU()
- #
- # History:
- # Date: By: Changes:
- # 07/19/93 KTA Created
- # 08/21/93 NMS added CustomScrollWindow()
- # 08/21/94 SBR added CustomExitVU() for experimentation
- # 09/04/95 SBR Added this header for Radar 1273927.
- # Formatted according to standards.
- # 09/27/96 BRL/MSO Updated copyright header
- # Use SPEC exception handling method (ExceptionHandling.lib)
- # 01/21/97 SBR Deleted older exception code and comments.
- #
- #########################################################################
- #########################################################################
-
- Libraries
- "ExceptionHandling.lib",
- "Output.Lib",
- "UserInterface.Lib",
- "Report.lib";
-
-
- #########################################################################
- # InitCustom()
- #========================================================================
- # Author: KTA
- # Description: This has been provided as a mechanism for scriptwriters to
- # customize the SPEC S&L Libraries. If the default value of
- # and global variables is not what is desired, this is the
- # task where the script writer should reset any global values.
- # This task is called from InitGloabls() immediately after all
- # global variables have been defined.
- # Please refer to 'The Hitchhikers Guide' for more information
- # concerning any individual global variables.
- # Parameters: None
- # Returns: Nothing
- # Examples: InitCustom();
- # Assumptions:
- #########################################################################
- #========================================================================
- # History:
- #########################################################################
- TASK InitCustom()
- begin
- global gTestCaseLoggingMethod, kTCSNoLoggingMethod, kTCSResultsExpressMethod;
- global gVerifyAppPriorToLaunch;
- global gPrintSuiteInfo, gAdditionalTargetInfo;
- global gExitVU;
-
- # global gSeedValue := 28160;
- # randomseed(gSeedValue);
-
- gVerifyAppPriorToLaunch := 1; # Do not launch the wrong version!
-
- # These "global constants" are defined in TCS.lib by the InitTCSLogging() task.
- # However, we can not call InitTCSLogging() because it assumes you want
- # kTCSResultsExpressMethod if gTestCaseLoggingMethod is undefined.
- # A major conundrum if I ever did see one!!
- # For now we will assume these "constants" will not change after SPEC 1.2.
- kTCSNoLoggingMethod := 0;
- kTCSResultsExpressMethod := 1;
-
- gTestCaseLoggingMethod := kTCSNoLoggingMethod;
- # gTestCaseLoggingMethod := kTCSResultsExpressMethod;
-
- gPrintSuiteInfo := 0;
- gAdditionalTargetInfo := 0;
-
- # gExitVU := task CustomExitVU; # Do not exit VU, see below.
- end;
-
-
-
-
- #########################################################################
- # CustomScrollWindow(xCoord, yCoord)
- #========================================================================
- # Author: NS
- # Description: Scrolls windows
- # Parameters: xCoord, yCoord
- # Returns: Nothing
- # Examples: CustomScrollWindow();
- # Assumptions: None
- # Applications: Any with scrollbars
- #========================================================================
- # History:
- # 09/27/96 BRL/MSO Added SPEC exception handling
- #########################################################################
-
- task CustomScrollWindow(xCoord := 200, yCoord := 200 )
- begin
- LogStr('Now doing custom scrolling');
-
- try
- match[window s:document c:true g:true z:true r:?theWindRect]!;
- catch theError
- ExceptionDispatcher(theError,,{"CustomScrollWindow", {xCoord, yCoord}});
-
- SizeWindow(xCoord, yCoord);
- TestWindow(,{3,7,5,9});
- ### NMS 9/24/93: Random and then back to top and left window scroll test
- SizeWindow((theWindRect[3]-theWindRect[1]),(theWindRect[4]-theWindRect[2]));
- ### NMS 9/24/93: Back to original size
- end;
-
- #########################################################################
- # CustomExitVU()
- #========================================================================
- # Author: SBR
- # Description: This task replaces the default behavior of SPEC when a
- # task calls the ExceptionHandler, which exits VU. This is
- # fine if you are using the VU MPW Tool, but not if you
- # have a VU driver script.
- # Parameters: None
- # Returns: Nothing
- # Examples: CustomExitVU();
- # Assumptions:
- #########################################################################
- #========================================================================
- # History:
- #########################################################################
- TASK CustomExitVU()
- begin
- trace(1);
- end;
-
-
-